
package com.ruoyi.web.controller.lingshui.integrityInformation;


import java.util.List;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.supervise.domain.HnCityPeopleBad;
import com.ruoyi.supervise.domain.HnCityPeopleGood;
import com.ruoyi.supervise.domain.IGMPersonalPoorInfo;
import com.ruoyi.supervise.domain.IGMPersonalWellInfo;
import com.ruoyi.supervise.service.IIntegrityInformationService;

/**
 * @ClassName: peopleBehaviorController
 * @Description: 诚信信息管理中人员行为的controller
 * @Author wtj
 * @DateTime 2020年5月12日 下午3:30:32
 */
@Controller
@RequestMapping("/integrityInformation/peopleBehavior")
public class peopleBehaviorController extends BaseController{

	private String goodBehaviorPrefix = "lingshui/integrityInformation/peopleGoodBehavior";
	private String badBehaviorPrefix = "lingshui/integrityInformation/peopleBadBehavior";
	
	@Autowired
    private IIntegrityInformationService integrityInformationService;
	
	/**
	 * @Title: peopleGood
	 * @Description: 跳转到人员良好行为记录页面
	 * @Author wtj
	 * @DateTime 2020-9-27 14:34:39
	 * @return
	 */
	@RequiresPermissions("integrityInformation:personGoodBehavior:view")
	@GetMapping("/peopleGood")
	public String peopleGood()
	{
	    return goodBehaviorPrefix + "/peopleGoodBehavior";
	}
	
	/**
	 * @Title: peopleGoodList
	 * @Description: 人员良好行为记录页面获取列表数据
	 * @Author wtj
	 * @DateTime 2020-9-27 14:35:26
	 * @param igmpwi
	 * @return
	 */
	@RequiresPermissions("integrityInformation:personGoodBehavior:list")
	@PostMapping("/peopleGoodList")
    @ResponseBody
    public TableDataInfo peopleGoodList(IGMPersonalWellInfo igmpwi)
    {
	   startPage();
	   List<IGMPersonalWellInfo> igmpwiList = integrityInformationService.selectIGMPersonalWellInfoList(igmpwi);
	   return getDataTable(igmpwiList);
    }
	
	/**
	 * @Title: peopleGoodExport
	 * @Description: 人员良好行为记录导出
	 * @Author wtj
	 * @DateTime 2020-9-27 14:37:25
	 * @return
	 */
	@RequiresPermissions("integrityInformation:personGoodBehavior:export")
	@PostMapping("/peopleGoodExport")
    @ResponseBody
    public AjaxResult peopleGoodExport()
    {
		List<HnCityPeopleGood> gbcList = integrityInformationService.statisticsIGMPersonalWellInfo();
		ExcelUtil<HnCityPeopleGood> util = new ExcelUtil<HnCityPeopleGood>(HnCityPeopleGood.class);
        return util.exportExcel(gbcList, "人员良好行为");
    }
	
	/**
	 * @Title: peopleBad
	 * @Description: 跳转到人员不良行为记录页面
	 * @Author wtj
	 * @DateTime 2020-9-27 14:38:31
	 * @return
	 */
	@RequiresPermissions("integrityInformation:personBadBehavior:view")
	@GetMapping("/peopleBad")
	public String peopleBad()
	{
	    return badBehaviorPrefix + "/peopleBadBehavior";
	}
	
	/**
	 * @Title: peopleBadList
	 * @Description: 人员不良行为记录页面获取列表数据
	 * @Author wtj
	 * @DateTime 2020-9-27 14:39:04
	 * @param igmppi
	 * @return
	 */
	@RequiresPermissions("integrityInformation:personBadBehavior:list")
	@PostMapping("/peopleBadList")
    @ResponseBody
    public TableDataInfo peopleBadList(IGMPersonalPoorInfo igmppi)
    {
	   startPage();
	   List<IGMPersonalPoorInfo> igmppiList = integrityInformationService.selectIGMPersonalPoorInfoList(igmppi);
	   return getDataTable(igmppiList);
    }
	
	/**
	 * @Title: enterprisesBadExport
	 * @Description: 人员不良行为记录导出
	 * @Author wtj
	 * @DateTime 2020-9-27 14:39:34
	 * @return
	 */
	@RequiresPermissions("integrityInformation:personBadBehavior:export")
	@PostMapping("/peopleBadExport")
    @ResponseBody
    public AjaxResult enterprisesBadExport()
    {
		List<HnCityPeopleBad> gbpaList = integrityInformationService.statisticsIGMPersonalPoorInfo();
		ExcelUtil<HnCityPeopleBad> util = new ExcelUtil<HnCityPeopleBad>(HnCityPeopleBad.class);
        return util.exportExcel(gbpaList, "人员不良行为");
    }
	
}
